package com.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.demo.service.ChatService;

@RestController
@CrossOrigin
public class ChatController {
	
	@Autowired
	private ChatService chatService;
	
	@RequestMapping("/chat/getMessage")
	public String getMessageFromPatient(@RequestParam String info,@RequestParam String user,@RequestParam String respondent  ) {

		return chatService.getMessageFromPatient(user, info,respondent);
		
	}

}
